<?
	include("../seguridad.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Excepcion Farmacia</title>
<link rel="shortcut icon" href="../../IMAGENES/ico_EstasEnPosse.png" />
<link href="../../EstasEnPosse3.0/Style.css" rel="stylesheet" type="text/css" />
<!-- TinyMCE -->
<script type="text/javascript" src="../../scripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "simple",
		skin : "o2k7",
		skin_variant : "silver",

		plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",

		// Theme options
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example word content CSS (should be your site CSS) this one removes paragraph margins
		content_css : "css/word.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>
<!-- /TinyMCE -->


	<script src="http://www.estasenposse.com/scripts/DatePicker/jquery-1.8.2.js"></script>
	<script src="http://www.estasenposse.com/scripts/DatePicker/jquery.ui.core.js"></script>
	<script src="http://www.estasenposse.com/scripts/DatePicker/jquery.ui.widget.js"></script>
	<script src="http://www.estasenposse.com/scripts/DatePicker/jquery.ui.datepicker.js"></script>
	
	
    <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
    
     <link rel="stylesheet" href="http://www.estasenposse.com/scripts/custom-theme/jquery-ui-1.9.0.custom.css">
     <link rel="stylesheet" href="http://www.estasenposse.com/scripts/custom-theme/jquery-ui-1.9.0.custom.min.css">


	<script>
	$(function() {
		$( "#from" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			numberOfMonths: 3,
			onSelect: function( selectedDate ) {
				$( "#to" ).datepicker( "option", "minDate", selectedDate );
			}
		});
		$( "#to" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			numberOfMonths: 3,
			onSelect: function( selectedDate ) {
				$( "#from" ).datepicker( "option", "maxDate", selectedDate );
			}
		});
	});
	</script>

<style type="text/css">
a:hover {
	text-decoration: none;
	color: #F68E02;
}

a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.FondoGris .textoTituloMasNovedades {
	text-align: center;
}
</style>
<link href="../../Style.css" rel="stylesheet" type="text/css" />
<link href="../../Style.css" rel="stylesheet" type="text/css" />
</head>

<body>

<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="3"><iframe src="../../encabezadoInternoSeccion.php" name="nombre"  width="1000" height="225" scrolling="No" frameborder="0" id="nombre"></iframe></td>
  </tr>
  <tr>
    <td width="670" height="40" bgcolor="#FF9900" class="barMenuBlanco">Cargar Excepcion...</td>
    <td width="165" align="center" bgcolor="#CCCCCC" class="textoTituloMasNovedades" ><a href="../Menu.php" class="LinksActivos2">Menú Principal</a></td>
    <td width="165" align="center" bgcolor="#CCCCCC" class="textoTituloMasNovedades" ><a href="logout.php" class="LinksActivos2">Cerrar Sesión</a></td>
  </tr>
  <tr>
    <td height="80" colspan="3">

		<form method="post" action="escribebd.php">
		  <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
	        <tr>
		  <td height="39" colspan="4"  bgcolor="#EEEEEE" class="textoSubtituloMasNovedades"><div align="left">Fecha: 
		        <? $fecha = time();
		$dia = date ("w" , $fecha);
		switch ($dia){
			case "0": 	
				$dia = "Domingo";
				break;
			case "1": 	
				$dia = "Lunes";
				break;
			case "2": 	
				$dia = "Martes";
				break;
			case "3": 	
				$dia = "Miércoles";
				break;
			case "4": 	
				$dia = "Jueves";
				break;
			case "5": 	
				$dia = "Viernes";
				break;
			case "6": 	
				$dia = "Sábado";
				break;			
		}
		$mes = date( "F" , $fecha );
		switch($mes){
			case "January";
				$mes = "Enero";
				break;
			case "February";
				$mes = "Febrero";
				break;
			case "March";
				$mes = "Marzo";
				break;
			case "April";
				$mes = "Abril";
				break;
			case "May";
				$mes = "Mayo";
				break;
			case "June";
				$mes = "Junio";
				break;
			case "July";
				$mes = "Julio";
				break;
			case "August";
				$mes = "Agosto";
				break;
			case "September";
				$mes = "Septiembre";
				break;
			case "October";
				$mes = "Octubre";
				break;
			case "November";
				$mes = "Noviembre";
				break;
			case "December": 	
				$mes = "Diciembre";
				break;	
		}
		echo $dia."&nbsp;";
		echo date ( " j " , $fecha );
		echo " de ";
		echo $mes;
		echo " de ";
		echo date("Y" , $fecha ); 
		$verifica= $_GET["carga"];
		?>
		        </div></td>
	          <td width="154" rowspan="5"><label for="Titulo"></label>		        <label for="Subtitulo"></label>
	            <label for="Posicion"></label><label for="Cuerpo"><br />
              </label></td>
	        </tr>
	        <tr>
	          <td height="39" colspan="4"  bgcolor="#ededed" class="FondoGris" align="center"><span class="textoTituloMasNovedades"> <? if($verifica!=1)
			  echo "Cargar excepción"; else echo "Cargado correctamente"; ?> </span></td>
            </tr>
	        <tr>
		      <td width="200" height="39" bgcolor="#ededed" class="FondoGris"><div align="right" class="textoTituloMasNovedades">Nueva farmacia:</div></td>
		      <td width="4" bgcolor="#FFFFFF" class="FondoGris">&nbsp;</td>
		      <td colspan="2" bgcolor="#FFFFFF" class="LineaSimpleDoble">
                <label for="select"></label>
		        <select name="idnueva" id="idnueva">

                  <?	
				  include("../conexionStaging.php");	
				  $listfarm = mysql_query("SELECT id_farmacia,nombre FROM farmacias ORDER BY NOMBRE ASC", $conexion) or die(mysql_error());			     
				 while ($rowEmp = mysql_fetch_assoc($listfarm))
				 {
					 echo "<option value='".$rowEmp['id_farmacia']."'>".$rowEmp['nombre']."</option>";	
							}
					mysql_close($conexion);
				  ?>
		         
              </select></td>
	        </tr>
		    <tr class="DivisorNoticia">
		      <td height="39" bgcolor="#ededed" class="textoTituloMasNovedades"><div align="right">Fecha excepcion:</div></td>
		      <td bgcolor="#FFFFFF">&nbsp;</td>
		      <td colspan="2" bgcolor="#FFFFFF" class="LineaSimpleDoble"><input type="text" id="from" name="from"/></td>
	        </tr>
		    <tr class="FondoAmarillo">
		      <td colspan="4" bgcolor="#ededed" class="textoTituloMasNovedades">&nbsp;</td>
	        </tr>
		    <tr>
		      <td height="51" colspan="5"><div align="right">
		        <input name="button" type="reset" class="textoTituloMasNovedades" id="button" value="Restablecer" />
		        <input name="novedad" type="submit" class="textoTituloMasNovedades" id="novedad" value="Cargar" />
	          </div></td>
	        </tr>
	      </table>
		  <div align="center"></div>
      </form>
	
  
    </td>
  </tr>
  <tr>
    <td colspan="3" bgcolor="#333333">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" class="LinksActivos"><div align="center"></div></td>
  </tr>
</table>
</body>
</html>